﻿using Domain.Entity.Basic_information;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Configer.Basic_information
{
    internal class Drivers_mentConfiger : IEntityTypeConfiguration<Drivers_ment>
    {
        public void Configure(EntityTypeBuilder<Drivers_ment> builder)
        {
            builder.ToTable(nameof(Drivers_ment));
            builder.HasKey(e => e.Dv_id);
            builder.Property(e => e.Dv_id).HasColumnType("bigint");
            builder.Property(e => e.Dv_name).HasColumnType("varchar(20)");
            builder.Property(e => e.Dv_phone).HasColumnType("varchar(11)");
            builder.Property(e => e.Dv_identy).HasColumnType("varchar(18)");
            builder.Property(e => e.Dv_gender).HasColumnType("char(1)");
            builder.Property(e => e.Dv_dl_type).HasColumnType("char(2)");
            builder.Property(e => e.Dv_dl_expiry).HasColumnType("DateTime");
            builder.Property(e => e.Dv_carrier).HasColumnType("varchar(20)");
            builder.Property(e => e.Dv_address).HasColumnType("varchar(64)");
            builder.Property(e => e.Dv_emg_cont).HasColumnType("varchar(20)");
            builder.Property(e => e.Dv_emg_ph).HasColumnType("varchar(11)");
            builder.Property(e => e.Dv_drvr_st).HasColumnType("tinyint").IsRequired().HasComment("司机状态：0、禁用 1、启用");
            builder.Property(e => e.Dv_doc_pic).HasColumnType("varchar(64)");
            builder.Property(e => e.Dv_drive_lic).HasColumnType("varchar(64)");
            builder.Property(e => e.Dv_cmts).HasColumnType("varchar(64)");
        }
    }
}
